package com.xinfu.newproject.adapter.paycost_adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.xinfu.newproject.R;


/**
 *
 */
public class PayCostDetailAdapter extends BaseQuickAdapter<String, BaseViewHolder> {


    public PayCostDetailAdapter() {
        super(R.layout.recycler_pay_cost_detail, null);
    }

    @Override
    protected void convert(BaseViewHolder helper, String item) {
        helper.setText(R.id.recycler_pay_cost_detail_tv2, item);
        switch (helper.getPosition()) {
            case 0:
                helper.setText(R.id.recycler_pay_cost_detail_tv1, "付款方式");
                helper.setTextColor(R.id.recycler_pay_cost_detail_tv2, mContext.getResources().getColor(R.color.location_color));
                break;
            case 1:
                helper.setText(R.id.recycler_pay_cost_detail_tv1, "缴费账号");
                helper.setTextColor(R.id.recycler_pay_cost_detail_tv2, mContext.getResources().getColor(R.color.location_color));
                break;
            case 2:
                helper.setText(R.id.recycler_pay_cost_detail_tv1, "缴费说明");
                helper.setTextColor(R.id.recycler_pay_cost_detail_tv2, mContext.getResources().getColor(R.color.location_color));
                break;
            case 3:
                helper.setText(R.id.recycler_pay_cost_detail_tv1, "住址信息");
                helper.setTextColor(R.id.recycler_pay_cost_detail_tv2, mContext.getResources().getColor(R.color.location_color));
                break;
            case 4:
                helper.setText(R.id.recycler_pay_cost_detail_tv1, "创建时间");
                helper.setTextColor(R.id.recycler_pay_cost_detail_tv2, mContext.getResources().getColor(R.color.location_color));
                break;
            case 5:
                helper.setText(R.id.recycler_pay_cost_detail_tv1, "支付时间");
                helper.setTextColor(R.id.recycler_pay_cost_detail_tv2, mContext.getResources().getColor(R.color.location_color));
                break;
            case 6:
                helper.setText(R.id.recycler_pay_cost_detail_tv1, "订单编号");
                helper.setTextColor(R.id.recycler_pay_cost_detail_tv2, mContext.getResources().getColor(R.color.location_color));
                break;
            case 7:
                helper.setText(R.id.recycler_pay_cost_detail_tv1, "发票信息");
                if (item.equals("已开票")) {
                    helper.setTextColor(R.id.recycler_pay_cost_detail_tv2, mContext.getResources().getColor(R.color.colorAccent));
                } else {
                    helper.setTextColor(R.id.recycler_pay_cost_detail_tv2, mContext.getResources().getColor(R.color.location_color));
                }
                break;
        }
    }

}
